package chapter8.section6;

import java.util.Comparator;

/**
 * 程序 8-8：一个实现了比较器接口的账户比较器
 */
public class IdComparator implements Comparator<Account> {
    @Override
    public int compare(Account o1, Account o2) {
        return o1.getId().compareTo(o2.getId());
    }
}
  